<%@ Page Language="VB" MasterPageFile="~/Admin/Admin.master" MaintainScrollPositionOnPostback="true" AutoEventWireup="false" CodeFile="Roles.aspx.vb" Inherits="Admin_Roles" title="Admin - Roles" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
<%@ Register Src="SubNavControls/RolePermissionsSubNavControl.ascx" TagName="RolePermissionsSubNavControl"
    TagPrefix="uc1" %>
    <%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

<uc1:RolePermissionsSubNavControl ID="RolePermissionsSubNavControl1" runat="server" />

       <table cellpadding="0" cellspacing="0">
       <tr><td width="20px"></td><td><h1><a id="pagecontent">Admin - Roles</a></h1></td></tr>
       </table>

        <asp:ObjectDataSource ID="RolesObjectDataSource" runat="server" SelectMethod="ListBySort"
            TypeName="Cdm.DataCore.UserSecurity.Role" DataObjectTypeName="Cdm.DataCore.UserSecurity.Role" UpdateMethod="UpdateInstance" InsertMethod="SaveInstance" SortParameterName="sortExpr">
        </asp:ObjectDataSource>
        
        <div style="position:relative; left:0px; top:0px;">
            <cc2:ValidationErrorSummary ID="ErrorSummary" runat="server" Message="" Visible="false" />
        </div>
        <div style="position:relative; left:0px; top:0px;">
        <asp:UpdatePanel Id="GridUpdatePanel" runat="server">
        <ContentTemplate>
        <cc2:ScrollingGridView ID="RolesScrollingGridView" runat="server" CssClass="gridOffsetSmall" ToolTip="160" Width="811px" Height="200px"
            AutoGenerateColumns="False" IsFixedColumn="true"  DataSourceID="RolesObjectDataSource" DataKeyNames="RoleID" Caption="Establish state names for these Roles." CaptionAlign="Top" 
            CellPadding="5" BorderColor="#21334B" BorderStyle="Solid" HorizontalAlign="center" GridLines="Vertical" AllowSorting="true">
        <HeaderStyle  CssClass="adminHeaderStyle" BackColor="#C3CAD4"  BorderColor="#21334B" VerticalAlign="Top" />
        <RowStyle CssClass="adminColumnStyle" />
        <Columns>
            <asp:BoundField DataField="RoleName" SortExpression="RoleName" HeaderText="Role Name" AccessibleHeaderText="Sort Role Name"  ReadOnly="true" ItemStyle-Width="300px" HeaderStyle-Width="306px" />
            <asp:TemplateField HeaderText="State Role Name" SortExpression="RoleDisplayName">
                 <ItemStyle HorizontalAlign="center" Width="300px" />
                <HeaderStyle Width="300px" />
                <ItemTemplate><%#Eval("RoleDisplayName")%></ItemTemplate>
                <EditItemTemplate>
                   <center><asp:TextBox ID="RoleDisplayTextBox" runat="server" ToolTip="edit state role name" Text='<%# Bind("RoleDisplayName") %>'></asp:TextBox></center>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Active?" SortExpression="IsActive" AccessibleHeaderText="Active?">
                <ItemStyle HorizontalAlign="center" Width="105px" />
                <HeaderStyle Width="105px" />
                <ItemTemplate>
                <asp:Image ID="IsActiveImage" runat="server" ImageUrl="~/images/blankcheck.gif" />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:CheckBox ID="EditActiveCheckbox" runat="server" Checked='<%#Bind("IsActive") %>' />
            </EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField EditText="Edit" ShowEditButton="True" HeaderText="Action" AccessibleHeaderText="Action">
                <ItemStyle HorizontalAlign="center" Width="75px" />
                <HeaderStyle Width="100px" />
            </asp:CommandField>
        </Columns>
        <AlternatingRowStyle BackColor="#E8ECF4" />
        </cc2:ScrollingGridView>
        </ContentTemplate>
        </asp:UpdatePanel>
        </div>
</asp:Content>

